#!/bin/bash

spark-sql -f ods_base_acd_file_d_i.sql
echo "正在执行ods_base_acd_file_d_i建表语句"
spark-sql -e "alter table ods.ods_base_acd_file_d_i add if not exists partition(pt='20250425')"
spark-sql -f ods_base_bd_drivinglicense_d_i.sql
echo "正在执行ods_base_bd_drivinglicense_d_i建表语句"
spark-sql -e "alter table ods.ods_base_bd_drivinglicense_d_i add if not exists partition(pt='20250425')"
spark-sql -f ods_base_bd_vehicle_d_i.sql
echo "正在执行ods_base_bd_vehicle_d_i建表语句"
spark-sql -e "alter table ods.ods_base_bd_vehicle_d_i add if not exists partition(pt='20250425')"
spark-sql -f ods_base_vio_force_d_i.sql
echo "正在执行ods_base_vio_force_d_i建表语句"
spark-sql -e "alter table ods.ods_base_vio_force_d_i add if not exists partition(pt='20250425')"
spark-sql -f ods_base_vio_surveil_d_i.sql
echo "正在执行ods_base_vio_surveil_d_i建表语句"
spark-sql -e "alter table ods.ods_base_vio_surveil_d_i add if not exists partition(pt='20250425')"